<h1>Image Handling</h1>
<p>Some basic <b>image</b> handling has been implemented</p>
<h2>Inline</h2>
<p>So far <img src="icon_smile.gif"> images work inline, sitting on the line's baseline. There is a workaround in place that if an image is more than twice as high as the surrounding text it will be treated as it's own block.</p>
<h2>Block</h2>
<p>There is a known issue with images as blocks, outside of p tags.</p>
<img class="Bla" style="width:150px; height:150px" src="Oliver.jpg">
<p>An Image outside of P is treated as a paragraph</p>
<p><img style="float:right;" width="100" height="100" src="Oliver.jpg">The previous image has float style. As a <span style="background-color:yellow;">Workaround</span> a newline is added after it until we can support floating in the layouting. This is done if the inline image is more than 5 times as large as the current font pixel size. This should allow small inline images, like smileys to stay in line, while most float images would probably be larger than this.</p>
<h2>Supported Attributes</h2>
<ul>
<li><b>width</b>, <b>height</b> in pixels</li>
<li><b>src</b> with a local file path relative to the app bundle</li>
</ul>
<h2>Supported Image Formats</h2>
<p>According to <a href="http://developer.apple.com/library/ios/#documentation/2DDrawing/Conceptual/DrawingPrintingiOS/Images/Images.html">Apple</a> the following image formats are supported for use with UIImage:</p>
<ul>
<li>png</li>
<li>tif, tiff</li>
<li>jpeg, jpg</li>
<li>gif</li>
<li>bmp, bmpf</li>
<li>ico</li>
<li>cur</li>
<li>xbm</li>
</ul>
<h2>Vertical Alignment</h2>
<p>Limited support for the CSS vertical-align tag exists</p>
<p style="font-size:20px">Baseline: <img style="vertical-align:baseline;" height=40 width=40 src="icon_smile.gif"></p>
<p style="font-size:20px">text-top: <img style="vertical-align:text-top;" height=40 width=40 src="icon_smile.gif"></p>
<p style="font-size:20px">text-bottom: <img style="vertical-align:text-bottom;" height=40 width=40 src="icon_smile.gif"></p>
<p style="font-size:20px">middle: <img style="vertical-align:middle;" height=40 width=40 src="icon_smile.gif"></p>	
<h2>Data Source</h2>
	<p>Base64 encoded data SRC is supported, for example this red dot: <img src="
	AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
	9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" /></p>
	<p>Another example:</p><img src="
	wAAACwAAAAADwAPAAACIISPeQHsrZ5ModrLlN48CXF8m2iQ3YmmKqVlRtW4ML
	wWACH+H09wdGltaXplZCBieSBVbGVhZCBTbWFydFNhdmVyIQAAOw=="
	alt="Base64 encoded image" width="100" height="100"/>
	
<h2>Remote Images</h2>
<p>Images can also be loaded from remote URLs, even without specifying a size in the HTML. The code demonstrates how to update the DTTextAttachment's display size after download and triggering a re-layout.</p>
<img src="https://www.cocoanetics.com/files/Cocoanetics_Square.jpg">
